min_max <- function (inpath, type, outpath) {
  
  ## read in  
  data <- read.csv(inpath)
  #data <- file(inpath)
  #data <- source(inpath)
  #data <- data(inpath)
  
  ##min/max berechnen
  out <- type(data$rH_200)
  
  ##Wert ausgeben
  write.table(out, outpath)
  #return(out)
}

min_max("D:/Dropbox/r-course/script/project/ki_0000foc3_000rug_201110010000_201110312355_eat_ca05_cti05_0005.dat",max,"D:/Dropbox/r-course/script/project/outputdata.txt")
#min_max("D:/Dropbox/r-course/script/project/inputdata.txt",max)